package com.nstechs.commerce.transaction.product;

import java.util.ArrayList;
import java.util.List;
import com.nstechs.commerce.common.util.DBUtil;

public class DictionaryTransfer extends Transfer {
	String insertUrl = "jdbc:mysql://localhost/products";
	String insertUser = "root";
	String insertPwd = "root";
	DBUtil dbInsert = new DBUtil(insertUrl, insertUser, insertPwd);
	
	String selectUrl = "jdbc:mysql://192.168.1.116/products";
	String selectUser = "root";
	String slectPwd = "123";
	DBUtil dbSelect = new DBUtil(selectUrl, selectUser, slectPwd);
	
	public void transferCountry(){
		String sql = "select c.code,c.name from country c;";
		List<ArrayList<Object>> list = queryList(dbSelect, sql);
		String insertsql = "insert into country(code,name) value(?,?);";
		excute(dbInsert, insertsql, list);
	}
}
